package com.bysc.commonutils.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Getter
@AllArgsConstructor
public enum ClientEnum {

    //PC端
    PC(0,"PC端"),

    //小程序端
    MiniProgram(1,"小程序端");


    private final Integer id;
    private final String value;

    public static String getValueById(int clientId) {
        for (ClientEnum type : values()) {
            if (type.getId() == clientId) {
                return type.getValue();
            }
        }
        throw new IllegalArgumentException("Invalid Client clientId: " + clientId);
    }


}
